package com.atguigu.core.feign;

import com.atguigu.core.bean.R;
import com.atguigu.core.dto.PayDto;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

//@FeignClient(value = "cloud-payment-service")
@FeignClient(value = "cloud-gateway")  // 网关上线
public interface PayFeignApi {


    @Operation(summary = "添加支付")
    @PostMapping("/pay/add")
    public R addPay(@RequestBody PayDto pay);

    @Operation(summary = "删除支付")
    @DeleteMapping("/pay/delete/{id}")
    public R deletePay(@PathVariable("id") Integer id);


    @Operation(summary = "更新支付")
    @PutMapping("/pay/update")
    public R updatePay(@RequestBody PayDto pay);

    @Operation(summary = "查询支付")
    @GetMapping("/pay/get/{id}")
    public R gePayDto(@PathVariable("id") Integer id);


    @GetMapping("/pay/get/info")
    String getInfoByConsul();

    @Operation(summary = "查询支付")
    @GetMapping("/pay-circuit/circuit/{id}")
    public R circuit(@PathVariable("id") Integer id);
    @Operation(summary = "查询支付")
    @GetMapping("/pay-circuit/bulkhead/{id}")
    public R bulkhead(@PathVariable("id") Integer id);
    @Operation(summary = "查询支付")
    @GetMapping("/pay-circuit/ratelimit/{id}")
    public R ratelimit(@PathVariable("id") Integer id);
    @GetMapping("/pay-micrometer/micrometer/{id}")
    public R micrometer(@PathVariable("id") Integer id);




    @GetMapping("/pay-gateway/get/{id}")
    public R gateway(@PathVariable("id") Integer id);

}
